<#include "./common/header.htm">
<script>
    $.ajax({
        url:"/version/isExist",
        type:"post",
        timeout : 1000, //超时时间设置，单位毫秒
        dataType:"json",
        success:function (data) {
            if(data.data){
                $("#version-up").addClass("systemUp")
                openVersionDialog()
            }else{
                $("#version-up").removeClass("systemUp")
            }
        }
    })
</script>
<body clanavbar-logotss="fixed-sidebar mini-navbar full-height-layout gray-bg" style="overflow:hidden">
   <div id="wrapper">
       <!--右侧部分开始-->
       <div class="gray-bg dashbard-1 content">
           <div class="row">
               <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                   <div class="navbar-header">
                      <div class="navbar-logoc">
						  <div class="navbar-logot"></div>
						  <span class="navbar-logoz">&nbsp;&nbsp;多&nbsp;维&nbsp;数&nbsp;据&nbsp;分&nbsp;析&nbsp;卫&nbsp;士</span>
					  </div>
					   <!--<input type="text" placeholder="姓名/手机/银行账号/身份证号" class="forsearch">-->
					   <span class="glyphicon glyphicon-search" aria-hidden="true"></span>

                       <!--<div class="user-content">-->
                           <div class="user-con">
                               <div class="user-img"></div>
                               <div class="user-nick">${loginUser.nickName!}&nbsp;&nbsp;
								   <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
							   </div>
                           </div>
						   <div class="forindex-con">
							   <div class="forindex-img"></div>
							   <div class="navbar-forindex">首页</div>
						   </div>
                           <ul class="user-edit-con">
                               <li class="muli muli1" onclick="setPwd()"><span class="iconfont icon-icon_xiugaimima icon-span"></span><a href="javascript:void(0);">修改密码</a>
                               </li>
                               <li class="muli muli2 " id="version-up"  onclick="openVersionDialog()"><span class="iconfont icon-shuaxin icon-span"></span><a href="#">系统升级</a>
                               </li>
                               <!--<li class="muli muli3" ><span class="iconfont icon-lianxiwomen icon-span"></span><a href="javascript:void(0);">联系我们</a>
                               </li>-->
                               <li class="divider"></li>
                               <li class="muli muli4" ><span class="iconfont icon-tuichu icon-span"></span><a href="${ctx}logout">安全退出</a>
                               </li>
                           </ul>
                           <span class="clear">
                           		<span class="text-muted text-xs block">${loginUser.roleName!}<b class="caret"></b></span>
                           </span>
                       </div>
                   <!--</div>-->
               </nav>
           </div>
           <div class="row main">
                <#list Session.firstLevelMenuList as menu>
           	   		<#if menu.indexShow==1 && menu.menuUrl??>
           	   			<div class="menublock" onclick="openMenu('${menu.menuName!}',1,'${menu.menuCode!}');">
							<div class="${menu.menuIcon!}" alt=""></div>
		                    <span class="main-fonts">${menu.menuName!}</span>
	                    </div>
           	   		</#if>
           	   		<#if secondLevelMenuMap["${menu.menuId}"]?? && (secondLevelMenuMap["${menu.menuId}"]?size > 0)>
	           	   		<#list Session.secondLevelMenuMap["${menu.menuId}"] as menu2>
		           	   		<#if menu2.indexShow==1 && menu2.menuUrl??>
		               			<div class="menublock" onclick="openMenu('${menu2.menuName!}',2,'${menu.menuCode!}','${menu2.menuCode!}');">
									<div class="${menu2.menuIcon!}" alt=""></div>
				                    <span class="main-fonts">${menu2.menuName!}</span>
			                    </div>
		           	   		</#if>
	           	   		</#list>
           	   		</#if>
           	   </#list>
           </div>
           <div class="fortooter">
               <div class="foot-logo">Copyright &copy; 2019&nbsp;&nbsp;&nbsp; 河南迈锐德实业有限公司&nbsp;&nbsp;&nbsp;联系电话：0371-88917000
               </div>
           </div>
       </div>
   </div>
<!--<#if Session["updateVersion"]?exists>
	<input id="updateVersion" hidden value='${Session["updateVersion"]}' />
</#if>-->
<script type="text/javascript">
	$(document).ready(function(){
        $(".user-edit-con").hide();
        //是否要升级 up为升级   no-up是不升级
       /* var up_flag=$("#updateVersion").val();
		if (up_flag=="up"){
			$("#version-up").addClass("systemUp")
            openVersionDialog()
		}else{
			$("#version-up").removeClass("systemUp")
		}*/
	})
    $('.user-nick').click(function(){
        $(".user-edit-con").toggle();
        $(this).children(".glyphicon").toggleClass("glyphicon-menu-down");
        $(this).children(".glyphicon").toggleClass("glyphicon-menu-up")
    });
    $(".user-edit-con").click(function(event){
        event.stopPropagation();
    });
    $(document).click(function(e){
		if ("user-nick"!=e.target.className) {
			$(".user-edit-con").hide();
            $('.user-nick').children("span").removeAttr("class");
            $('.user-nick').children("span").attr("class","glyphicon glyphicon-menu-down");
		}
    });

	function chooseCase() {
		base.getView({
			url:"${ctx}/casemanage/list",
			success:function(result){
				bootbox.dialog({
					message:result,
					size:"large",
					boxCss:{"width":"1270px"},
					closeButton : false,
				})
			}
		});
	}
	function openMenu(title,level,menuCode,menuCode2){
		if(level==1){
			var openWin = window.open("${ctx}home2?menuCode="+menuCode,"_blank","",false);
			setTimeout(function(){ openWin.document.title = title; }, 100);
		}else{
			var openWin = window.open("${ctx}home?menuCode="+menuCode+"&menuCode2="+menuCode2,"_blank","",false);
			setTimeout(function(){ openWin.document.title = title; }, 100);
		}
	}
</script>
<link rel="stylesheet" href="${ctx}/bower_components/index-icon/iconfont.css">
<style type="text/css">
    .user-edit-con .muli a:focus{
        color: #98A7C6;
    }
	.main{
		text-align: center;
	}
	#wrapper{
		height: 100%;
	}
h1{margin-left:20px;font-family:微软雅黑;float:left;width:40%;}
.content{display:flex;flex-direction: column;height:100%;width:100%;
    background:url(${ctx}/imgs/login-imgs/login-background.jpg);
}
.main{flex:1;margin: 100px 0px 0 0px;}

.navbar-header{width:100%;height: 65px}
.m-t-xs{line-height:26px;font-size:14px;margin:5px;float:left;}
.text-xs{float:left;line-height:34px;}
.navbar .dropdown-menu{margin-left:-90px;}
.navbar-fixed-top, .navbar-static-top{
    height: 65px;
    background: #323661;
    color: #fff;
}
    .muli:last-child {
        border-top: 1px solid #5075AC;
    }
    .menublock:nth-of-type(1){
        background-color: #1dd2f2;
    }
.menublock:nth-of-type(2){
    background-color: #7b55ea;
}
.menublock:nth-of-type(3){
      background-color: #0d9aea;
}

.menublock:nth-of-type(4){
        background-color: #fd4b87;
}
.menublock:nth-of-type(5){
    background-color: #5ea2f8;
}
.menublock:nth-of-type(6){
    background-color: #b76ef1;
}
.menublock:nth-of-type(7){
    background-color: #405cd1;
}
.menublock:nth-of-type(8){
    background-color: #1f72f8;
}
ul.user-edit-con {
	width: 160px;
	height: 120px;
	float: right;
	margin-right:-220px;
	margin-top: 64px;
	background-color: #245399;
	border-radius: 5px;
}
.user-con{
	margin-right:20px;
}
.forindex-con{
	margin-right:22px;
}
.glyphicon.glyphicon-menu-up{
	font-size: 10px;
}
.ui-dialog-body{
	padding: 0;
}
.ui-dialog {
	border: none;
	box-shadow: 0 0 8px rgba(0,0,0,.1)!important;
	background: transparent;
}
.systemUp:after{
	content: "";
	width: 10px;
	height: 10px;
	display: inline-block;
	background: red;
	border-radius: 5px;
	position: relative;
	top: -7px;
	left: -4px;
}
</style>
</body>
</html>
